const express = require('express');
const router = express.Router();
const userController = require('../controller/userController');

// 用户相关路由
router.get('/', (req, res) => {
    res.json({user:{id:1}});
})

router.get('/list', userController.getList);
router.post('/register', userController.createDate);
router.get('/delete', userController.deleteDate);
router.get('/update', userController.updateData);

module.exports = router;    // 导出路由